<?php
// Joiner Setup Options

//global $CFG;
$JOINER_CFG = new StdClass();

$JOINER_CFG->version = 0.1;

///////////////////////////////////////////////////////////////////////////////////////
//  JOINER OPTIONS
///////////////////////////////////////////////////////////////////////////////////////

// Notes, fields can be a max length of 45 characters.
//NOTE: Do not use this plug-in if you have an empty field set.  It will cause failures.

$JOINER_CFG->fields = array( 
    array( 'name'=>'Department', 'type'=>'select', 'values'=>array('SISAT','Religion','Botany')),
    array( 'name'=>'Advisor', 'type'=>'input', 'values'=>array() ),
    array( 'name'=>'Degree', 'type'=>'select', 'values'=>array('PhD','MSIS','Alumni')) );

    
    
// Create the references to the profile fields so that they will show up for the user to edit & for other users to view.    
//      This is later used by lib.php to add w/o being overwritten by the config.profile.php setting files.
$JOINER_CFG->profilefields = array();

// Add the actual code for the making sure that the fields above show up on the profile edit screen.
$JOINER_CFG->profilefields[] = (object)(array(
        "name" => ("My Department"),
        "internal_name" => "Department",
        "field_type" => "text",
        "description" => ("What department are you in at CGU?"),
        "user_type" => "person",
        "category" => ("Basic details"),
        "invisible" => false,
        "required" => false,
        ));
$JOINER_CFG->profilefields[] = (object)(array(
        "name" => ("My Advisor"),
        "internal_name" => "Advisor",
        "field_type" => "text",
        "description" => ("Who is your advisor at CGU?"),
        "user_type" => "person",
        "category" => ("Basic details"),
        "invisible" => false,
        "required" => false,
        ));
$JOINER_CFG->profilefields[] = (object)(array(
        "name" => ("Degree Goal"),
        "internal_name" => "Degree_Goal",
        "field_type" => "text",
        "description" => ("What degree you looking for at CGU?"),
        "user_type" => "person",
        "category" => ("Basic details"),
        "invisible" => false,
        "required" => false,
        ));

        
        
// Community Option Rules
//  These rules are applied upon 1st login & after using the mod/join/html/join.php to set options.  They are not applied to regular profile edits.

//      Note that field & department are both case-sensitive.
$JOINER_CFG->community_rules = array( 
    array( 'field'=>'Department', 'value'=>'SISAT', 'community'=>'siSAT', 'id'=>5),
    array( 'field'=>'Department', 'value'=>'Religion', 'community'=>'Religion', 'id'=>3)
);

// Add everyone to the following community
$JOINER_CFG->community_join = array(
    array( 'community'=>'help', 'id'=>6)

);
   
?>